<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="X-UA-Compatible" content="ie=edge">
  <title>Document</title>
  <style>
    *{margin:0; padding:0;}
    .box{width:100px; height:200px; background-color:#ccc; position:absolute;}
    .son{width:20px; height:20px; position:absolute; left:0; right:0; top:0; bottom:0; margin:auto; background-color:#f00;}
  </style>
</head>
<body>
    <div class="box">
      <div class="son"></div>
  </div>
</body>
</html>